import request from '@/utils/request'

export function contestListAdmin(query) {
  return request({
    url: '/practice/contest/contestListAdmin',
    method: 'get',
    params: query
  })
}

export function contestAdminById(query) {
  return request({
    url: '/practice/contest/contestAdminById',
    method: 'get',
    params: query
  })
}

export function addContest(data) {
  return request({
    url: '/practice/contest/addContest',
    method: 'post',
    data
  })
}

export function updateContestDefunct(query) {
  return request({
    url: '/practice/contest/updateContestDefunct',
    method: 'post',
    params: query
  })
}

export function deleteContest(query) {
  return request({
    url: '/practice/contest/deleteContest',
    method: 'post',
    params: query
  })
}

export function pageContest(query) {
  return request({
    url: '/practice/contest/pageContest',
    method: 'get',
    params: query
  })
}

export function contestById(query) {
  return request({
    url: '/practice/contest/contestById',
    method: 'get',
    params: query
  })
}

export function addContestUser(data) {
  return request({
    url: '/practice/contest-user/addContestUser',
    method: 'post',
    data
  })
}

export function validateContestUser(query) {
  return request({
    url: '/practice/contest-user/validateContestUser',
    method: 'get',
    params: query
  })
}

export function listContestProblem(query) {
  return request({
    url: '/practice/contest-problem/listContestProblem',
    method: 'get',
    params: query
  })
}

export function solutionContest(query) {
  return request({
    url: '/practice/solution/solutionContest',
    method: 'get',
    params: query
  })
}

export function contestRank(query) {
  return request({
    url: '/practice/contest/contestRank',
    method: 'get',
    params: query
  })
}
